<!DOCTYPE html>
<html>
<head>
  <script src="https://unpkg.com/vue@3"></script> 
  <script src="./dist/my-component.umd.js"></script>
  <link rel="stylesheet" href="./dist/my-component.css">
</head>
<body>
  <div id="app">
  </div>
 
  <script>
    Vue.createApp({
      template: `<div @click="hanleClick">haha</div>`,
      methods: {
        hanleClick() {
          window.MyComponent.success('123')
        }
      },
      mounted() {
        console.log(window.MyComponent.success('123'), 'Message')
      }
    })
    .mount('#app')
  </script>
</body>
</html>